package com.hoyue.common;

import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Component;

/**
 * @author SiMan
 * @date 2019/8/28 10:58
 * js调用 thymeleaf 实现按钮权限
 */
@Component("perms")
public class PermsService {
	public boolean hasPerm(String permission)
	{
		return SecurityUtils.getSubject().isPermitted(permission);
	}
}
